﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_DanhSachThi_ThemHocVien : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        loaddulieu();
    }

    private void loaddulieu()
    {
        List<DanhSachThiINFO> dsloaicauhoi = DanhSachThiDAL.listAll();
        string tenhocvien = txtTenhocvien.Text;
        string maduthi = txtmaduthi.Text;
        

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string tenhocvien = txtTenhocvien.Text;
        int maduthi = 0;
        
        DanhSachThiINFO obj = new DanhSachThiINFO();
        obj.TenHV = tenhocvien;
        obj.MaDuThi = maduthi;
        
        if (DanhSachThiDAL.Insert(obj) > 0)
        {
            Literal1.Text = "<p class='text-green'>Đã thêm dữ liệu!</p>";
            txtTenhocvien.Text = "";
            txtmaduthi.Text = "";
            
        }
        else
        {
            Literal1.Text = "<p class='text-red'>Không thể thêm dữ liệu!</p>";
        }
    }
}